package network.interpreter;

import java.net.InetAddress;

/**
 * represents an interpreter for data, when a packet is received discrete
 * data elements inside the packet are automatically sent to their speicifed
 * interpreters for processing
 * @author jack
 *
 */
public interface Interpreter
{
	/**
	 * gets the id of the iterpreter, this value should be unique
	 * among all the interpreters registered with the program
	 * @return returns the id of the interpreter
	 */
	public byte getID();
	/**
	 * interprets the passed data
	 * @param d
	 * @param address the address from which the packet was sent
	 */
	public void interpret(byte[] d, InetAddress address);
}
